﻿<!DOCTYPE html>
<html>
<head>
    <title>Directories</title>
</head>
<body>
<h3>Directories</h3>
<p>At a first look, the directory structure of Cosmos is quite confusing. There are folders with same names, two source folders and so on. I'll try to show you how the directories are structured, so that you can find what you're looking for</p>
<h4>\Build</h4>
<p>The build directory contains file used to build ISO images and Virtual Machines files and images. There is a folder with support files for BOCHS, for VirtualPc, for VMware, QEMU, for support for boot from ISO CD, USB, Ethernet (PXE)</p>
<p>There is also an additional folder <b>VSIP</b>. It normally contains a file called <i>install.bat</i>. That file must be executed as you download the code and everytime you change some code which is non-kernel related (eg. the debugger, the VS integration package, the IL2CPU code etc)</p>
<p>It compiles all the projects to libraries, creates a Win32 Installer and setups the Visual Studio IP. At the end it starts Visual Studio.</p>
<p>You should close Visual Studio before executing install.bat.</p>
<h4>\Docs</h4>
<p>Just a bunch of bad-structured documentation about Cosmos</p>
<h4>\QA</h4>
<p>Todo.</p>
<h4>\Resources</h4>
<p>Here you can put any pdf, doc, rtf, txt which can be used as a reference help to develop Cosmos.</p>
<p>It contains the folder <b>x86</b>. Inside you can find many interesting references about the x86 architecture.</p>
<h4>\Setup2</h4>
<p>Contains scripts and languages to build the Cosmos User Kit Installer. The creation (and execution) of the installer is started from \Build\VSIP\install.bat</p>
<h4>\Source</h4>
<p><b>TODO: Check correctness of the following sentences: </b>Contains a lot of code which is now not used. It was used previously, but it was decided to take it away and to restructure the code organization. It may be reintegrated however in future, with some code changes.</p>
<p>It also contains the solution file of Cosmos and some support libraries, which IMHO should be moved to Source2</p>
<h4>\Source2</h4>
<p>Contains the real code of Cosmos. You will spend most of your time here. However as you open it, you get confused again. Another Build, another VSIP, two or three Debug directories, etc. Let's summarize:</p>
<h4>\Source2\Build</h4>
<p>Any code related to the building process of Cosmos with the exception of IL2CPU which is however executed from here. Contains code for executing ld, nasm, makeiso, MSBuild, and others.</p>
<h4>\Source2\Compiler</h4>
<p><b>TODO: Check</b>. This piece of code gives us the possibility to write Assembly in C#. In this way we can keep all in an OO-like style.</p>
<h4>\Source2\Debug</h4>
<p>Contains the Debug Engine and Connector code. Also gives the possibility to work with GDB. For more informations about debugging see <a href="debugger.htm">Debugger</a></p>
<h4>\Source2\Demos</h4>
<p>Should contain examples of the use of the Cosmos User Kit. Actually only a number Guess demo is available</p>
<h4>\Source2\IL2CPU</h4>
<p>Code for the IL2CPU program. It's the Cosmos AOT Compiler. Form more informations about AOT compilers and IL2CPU see <a href="il2cpu.htm">IL2CPU</a></p>
<h4>\Source2\Kernel</h4>
<p>The kernel code. One might think that in an operating system, the kernel code must be the most complex, but in this case it is actually the simplest as we are concentrating on debugging. As we finish the debug step, we will develop the kernel full-time. At the time it contains three folders:</p>
<h4>\Source2\Kernel\Debug</h4>
<p>Contains helpers for the DS code.</p>
<h4>\Source2\Kernel\System</h4>
<p>Contains most of the code of the kernel, including drivers and the core.</p>
<h4>\Source2\Tests</h4>
<p>TODO</p>
<h4>\Source2\UserKit</h4>
<p>TODO</p>
<h4>\Source2\Users</h4>
<p>Custom code playground. You can put your examples, random code, and toughts here</p>
<h4>\Source2\Utils</h4>
<p>TODO</p>
<h4>\Source2\VSIP</h4>
<p>Contains the code for the integration with Visual Studio. Adds support for the Cosmos Kernel project tipe, and custom build steps.</p>
</body>
</html>
